package cn.iocoder.yudao.module.engine.enums;

import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.ToString;

import java.util.Arrays;

@ToString
@AllArgsConstructor
public enum EnumAudioType implements IntArrayValuable {
    CHAT(1, "语音对话", 2),
    BGM(2, "背景", 100),
    PREFIX(3, "前缀", 100),
    SUFFIX(4, "后缀", 100),
    GUID(5, "语音引导", 3),
    THREE_AXIS_HIGH(6, "高潮响应", 1),
    THREE_AXIS_RANGE(7, "坐标幅度", 4),
    CMD_AUDIO(8, "指令反馈", 0),
    BUY_GUID(9, "购买引导", 3),

    ;

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(EnumAudioType::getType).toArray();

    /**
     * 类型
     */
    private final Integer type;

    /**
     * 名字
     */
    private final String name;

    /**
     * 优先级（越小优先级越高）
     *
     * @return
     */
    private final Integer priority;

    @Override
    public int[] array() {
        return ARRAYS;
    }

    @JsonValue
    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public Integer getPriority() {
        return priority;
    }
}
